<template>
	<i-page title="核销结果" :back="false" navBgColor="#f3f4f5" bgColor="#f3f4f5">
		<i-card padding="64rpx 0">
			<view class="card_body">
				<image v-if="type === 'success'" src="../../static/images/success_icon.png" mode=""></image>
				<image v-else src="../../static/images/fail_icon.png" mode=""></image>
				<text class="title_text">{{type === 'success' ? '核销成功' : '核销失败'}}</text>
				<i-buttons radius="4" padding="16rpx 112rpx" size="28" color="#16161F"
					@click="navTo('', 'navigateBack')">完成</i-buttons>
			</view>
		</i-card>
	</i-page>
</template>

<script lang="ts" setup>
	import {
		navTo,
	} from '../../utils/common'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		ref
	} from 'vue';
	const type = ref('')

	onLoad((option) => {
		if (option && option.type) {
			type.value = option.type
		}
	})
</script>

<style lang="scss" scoped>
	// .result_off {
	// 	width: 100%;
	// 	height: 100vh;
	// 	overflow: hidden;
	// 	background-color: $backColor;

	.card_body {
		@include flexCC;

		image {
			width: 120rpx;
			height: 120rpx;
			margin-bottom: 20rpx;

		}

		.title_text {
			margin-bottom: 40rpx;
			@include titlefont;
		}
	}

	// }
</style>
